#!/bin/sh 
set -e 
TARGET=ocautil
 
FLAGS= 
OCAMLBUILD="ocamlbuild" #-ocamlopt /usr/local/ocaml/9.3/bin/ocamlopt -ocamlc /usr/local/ocaml/9.3/bin/ocamlc"
 

ocb() 
{ 
	$OCAMLBUILD $FLAGS $* 
} 
rule() { 
	case $1 in 
		clean) ocb -clean;; 
		native) ocb $TARGET.cmxa;; 
		byte) ocb $TARGET.cma;; 
		all) ocb $TARGET.cmxa $TARGET.cma;; 
		depend) echo "Not needed.";; 
		*) echo "Unknown action $1";; 
	esac; 
} 
if [ $# -eq 0 ]; then 
	rule all 
else 
while [ $# -gt 0 ]; do 
	rule $1; 
	shift 
done 
fi 
